import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import First from '../views/First.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
Vue.use(VueRouter)

const routes = [
  {
    path:'/login',
    component:Login
    // component:()  =>import (/* webpackChunkName: "Login" */ '../views/Login.vue'),
  },
  {
    path:'/register',
    component:Register
    // component:()  =>import (/* webpackChunkName: "Register" */ '../views/Register.vue'),
  },
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect:'/',
    children:[
      {
        path:'three/:id',
        component:()  =>import (/* webpackChunkName: "Three" */ '../views/Three.vue'),
        props:true
      },
      {
        path:'pay',
        component:()  =>import (/* webpackChunkName: "Pay" */ '../views/Pay.vue'),
      },
      {
        path:'dingdan',
        component:()  =>import (/* webpackChunkName: "Dingdan" */ '../views/Dingdan.vue'),
      },
      {
        path:'list',
        component:()  =>import (/* webpackChunkName: "List" */ '../views/List.vue'),
      },
      {
        path: 'two',
        component:()  =>import (/* webpackChunkName: "Two" */ '../views/Two.vue'),
      },
      {
        path:'about',
        component:()  =>import (/* webpackChunkName: "About" */ '../views/About.vue'),
      },
      {
        path:'photo',
        component:()  =>import (/* webpackChunkName: "Photo" */ '../views/Photo.vue'),
        props:true
      },
      {
        path:'details',
        component:()  =>import (/* webpackChunkName: "Details" */ '../views/Details.vue'),
      },
      {
        path:'reserve',
        component:()  =>import (/* webpackChunkName: "Reserve" */ '../views/Reserve.vue'),
      },
      {
        path:'info',
        component:()  =>import (/* webpackChunkName: "Info" */ '../views/Info.vue'),
      },
      {
        path:'/',
        component:First,
        children:[{
          path:'/first',
          component:First
        }
    ]
      },
    ]
  },
  {
    path: '/about',
    name: 'About',
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
